#Get-ExecutionPolicy -List

#1. constant
#$computers="localhost"
#Set-Variable -Name DriveType -Value 3 -Option Constant

#foreach($computers in $computers)
#{
#	"Hard drivers on :"+$computers
#	Get-WmiObject -Class Win32_logicalDisk -ComputerName $computers | where {$_.driveType -eq $DriveType}
#}

#2. Expanding string
#$i=12
#"$i is equal to $i"
#'$i is equal to '+$i
#"'$i is equal to $i"

#3. do while
#$i=0
#$array=1..5
#do
#{
#	$array[$i]
#	$i++
#}
#while($i -lt 5)

#4. do until
#$i=0
#$array=1..5
#do
#{
#	$array[$i]
#	$i++
#}
#until($i -eq 5)

#5 for
#for($i=0;$i -le 5;$i++)
#{
#	$i
#}

##6 foreach
#$array=1..5
#foreach($i in $array)
#{
#	$i
#}

#7 foreach-object

#1..5 | ForEach-Object{$_}

#8 break, exit
#$array=1..5
#foreach($i in $array)
#{
#	if($i -eq 3)
#	{
#		exit
#	}
#	$i
#}


#9 switch
$a=2
switch($a)
{
	1 {'$a=1';break}
	2 {'$a=2';break}
	2 {'$second match of the $a variable';break}
	3 {'$a=3';break}
	default {'unable to determine value of $a';break}
}